package com.example.glgk.mapper;

import com.example.glgk.dto.*;
import com.example.glgk.entity.IndicatorCalculateRoomEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author liuxingkun
 */
@Mapper
public interface YDSJMapper {

    List<IndicatorCalculateRoomEntity> queryMonthData(IndicatorCalculate indicatorCalculate);

    /**
     * 查询tableList数据
     * @param indicators
     * @param indicatorCalculate
     * @return
     */
    List<IndicatorCalculateRoomEntity> queryTableList(@Param("indicators") List<String> indicators, @Param("indicatorCalculate") IndicatorCalculate indicatorCalculate);

    /**
     * 上面的变式，数据结构在sql中更好处理
     * @param indicators,indicatorCalculate
     * @param indicatorCalculate
     * @return
     */
    List<DepartmentIndicatorDto> queryTableList3(@Param("indicators") List<String> indicators, @Param("indicatorCalculate") IndicatorCalculate indicatorCalculate
                                                 );

    /**
     * 查询科室月度数据
     * @param indicatorCalculate
     * @return
     */
    List<DepartmentIndicatorDto> queryDepartmentMonth(IndicatorCalculate indicatorCalculate);

    /**
     * 查询近五年年度数据
     * @param indicatorCalculate
     * @return
     */
    List<DepartmentHistoricalEntity> queryHistoricalData(IndicatorCalculate indicatorCalculate);

    /**
     * 查询责任部门下所有科室的月度数据
     * @param indicatorCalculate
     * @return
     */
    List<DepartmentIndicatorDto> queryByIndicator(IndicatorCalculate indicatorCalculate);

    /**
     * 获取部门报告下循环列表的数据
     * @param indicatorCalculate
     * @return
     */
    List<LoopData> queryLoopData(@Param("indicatorCalculate") IndicatorCalculate indicatorCalculate,@Param("indicators") List<String> indicators);
}
